# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-emoji
_pkgorig=emoji
pkgver=2.14.0
pkgrel=0
pkgdesc="Emoji terminal output for Python"
url="https://github.com/carpedm20/emoji"
arch="noarch"
license="BSD-3-Clause"
depends="python3"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest-xdist"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/carpedm20/emoji/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgorig-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -n auto -k 'not test_zwj_replace and not test_zwj_remove'
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
6e91a67702b42e246003feca13b24794faf55cbcbcc06c66ed7671f0407cf68ac66f8b076655b550c5b5ed7835d1c13ba680128fea8a656721780eac2fd9ea46  py3-emoji-2.14.0.tar.gz
"
